<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="/bigjo/js/jquery.js"></script>
<title>Insert title here</title>
</head>

<script type="text/javascript">
	jQuery.noConflict();
	jQuery(".insert").click(function(){
		var idx = document.URL.indexOf("bigjo");
		var str = document.URL.substring(0,idx+5);
		var sr_no = jQuery(this).attr("sr_no");
		var sb_no = jQuery(this).attr("sb_no");
		var m_id = jQuery(this).attr("m_id");
		var context = jQuery(".reformtext").val();
		var retext = jQuery("#retext"+sr_no).val();
		if(context == ""){
			alert("댓글을 입력하세요~~");
			return false;
		}else{
			jQuery.ajax({
				url: str+"/ReplyreplyInsert.reply?sr_no="+sr_no+"&sb_no="+sb_no+"&m_id="+m_id+"&retext="+retext,
				error:function(data){
					alert("오류 발생");
				},
				success : function(data){
					jQuery(".reply").html(data);
				}
			});
		}
	});
</script>
<body>
	<input type="text" class="reformtext" id="retext${sr_no}" value="" style="width: 200px"><input type="button" m_id="${m_id}" sr_no="${sr_no}" sb_no="${sb_no}" class="insert" value="입력">
</body>
</html>